Yes.
The INPUT statement that reads a string looks like this:
INPUT #fileNumber, variable
The #fileNumber
must be for a file that has already been
opened for INPUT.
For string input,
variable
should be a string variable.
Such variables end with a dollar sign,
for example DATA$
.
When the statement executes,
one string is read from the file.
The string consists of all the characters on one line
up to a comma or the end of the line.
Leading and trailing spaces are removed from the string,
but internal spaces are kept.
The string is read into variable
.
For example, say that the input file looks like this:
line one string two, string three 123 456 789
Say that the file has just been opened (as #5) so that nothing has been read in, yet. When the statement
INPUT #5, WORDS$
is executed, the the entire first line is read in.
The string "line one" including the space
is assigned to the variable WORDS$
.
Say that another statement (that looks just like the first) in the program executes:
INPUT #5, WORDS$
What is read in?